/**
 * 工具函数统一导出
 */

// 通用工具函数
export * from './common';

// 表单验证工具
export * from './validate';

// 权限管理工具
export * from './permission';

// WebSocket封装
export * from './websocket';

// 缓存管理工具
export * from './cache';

// 主题切换工具
export * from './theme';

// 重新导出常用工具函数，方便使用
export {
  // 通用工具
  formatDate,
  debounce,
  throttle,
  deepClone,
  formatFileSize,
  randomString,
  getUrlParam,
  setUrlParam,
  removeUrlParam,
  isMobile,
  isWeChat,
  getBrowserInfo,
  copyToClipboard,
  downloadFile,
  getImageSize,
  compressImage
} from './common';

export {
  // 验证工具
  validateEmail,
  validatePhone,
  validateIdCard,
  validateUrl,
  validatePassword,
  validateChineseName,
  validateBankCard,
  validateIP,
  validatePort,
  validatePostalCode,
  validatePlateNumber,
  validateField,
  validateForm
} from './validate';

export {
  // 权限工具
  permissionManager,
  permissionUtils,
  usePermission,
  permissionGuard,
  RequirePermission,
  RequireRole,
  permissionDirective
} from './permission';

export {
  // WebSocket工具
  WebSocketManager,
  WebSocketPool,
  wsPool,
  wsUtils,
  useWebSocket,
  WebSocketStatus
} from './websocket';

export type { WebSocketStatusType } from './websocket';

export {
  // 缓存工具
  MemoryCache,
  LocalStorageCache,
  SessionStorageCache,
  CacheManager,
  cacheManager,
  cacheUtils
} from './cache';

export {
  // 主题工具
  ThemeManager,
  themeManager,
  themeUtils,
  useTheme,
  defaultThemes,
  generateCSSVariables,
  generateThemeStyles
} from './theme';
